
<div id="login_form" class="form">
    <p class="login">
<?PHP 
if ($err_login){
    echo('<h3 class="err">Neplatné přihlášení</h3>');
} else {
    echo ("<h3>Přihlášení: </h3>");
}
?>
    <form action="index.php" method="post" id="form_log">
        <p class="login">
        <label for="username">name:&nbsp;</label><input type="text" class="login" value="<?php echo htmlspecialchars($_POST['username']); ?>" maxlength="50" alt="login" size="20" name="username" id="username">
        </p>
        <p class="login">
            <label for="pass">pass:&nbsp;&nbsp;</label><input type="password" class="login" maxlength="50" size="20" alt="heslo" name="pass" id="pass">
        </p>
        <p class="login">
            <input type="checkbox" class="login" alt="zapamatovat" name="remember" id="remember">zapamatovat
        </p>
        <p class="login">
            <input type="submit" class="button" alt="prihlasit" value="Přihlásit" id="login_btn" name="login_btn">
        </p>
    </form>
  </div>
<script type="text/javascript">
    var form = document.getElementById('form_log');
    form.onsubmit = ctrl_log;
    function ctrl_log(){
        var jmeno = document.getElementById('username');
        var pass = document.getElementById('pass');
        if (jmeno.value == ''){
            alert('Chybí vypln\u011bné uživatelské jméno!');
            return(false);
        }
        if (pass.value == ''){
            alert('Chybí vypln\u011bné heslo!');
            return(false);
        }
        return(true);
    }
</script>

<?php

?>
